﻿package com.dykj.platform.iadapter.tags;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ComponentTagSupport;

import com.opensymphony.xwork2.util.ValueStack;

public class PageTags extends ComponentTagSupport{
    private String curpage;  //当前页  
    private String totalpage;  //总页数  
    private String totalrecord; //总记录数
	@Override
	public Component getBean(ValueStack arg0, HttpServletRequest arg1, HttpServletResponse arg2) {
		return new Page(arg0);
	}
	//	获得参数  
    protected void populateParams() {  
        super.populateParams(); 
        Page page = (Page)component;
        page.setCurpage(curpage);
        page.setTotalPage(totalpage);
        page.setTotalRecord(totalrecord);
    }
	public String getCurpage() {
		return curpage;
	}
	public void setCurpage(String curpage) {
		this.curpage = curpage;
	}
	public String getTotalpage() {
		return totalpage;
	}
	public void setTotalpage(String totalpage) {
		this.totalpage = totalpage;
	}
	public String getTotalrecord() {
		return totalrecord;
	}
	public void setTotalrecord(String totalrecord) {
		this.totalrecord = totalrecord;
	}
}
